﻿[Files]
Source: "E:\Projects\Work\LPZ\ProtocolPlayer_trunk\Player\bin\Release\Common.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Projects\Work\LPZ\ProtocolPlayer_trunk\Player\bin\Release\Protocol Viewer.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Projects\Work\LPZ\ProtocolPlayer_trunk\Player\bin\Release\UI.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Projects\Work\LPZ\ProtocolPlayer_trunk\Release\Source\dotNetFx40Client.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Check: CheckForFramework

[Icons] 
Name: "{group}\Protocol Viewer"; Filename: "{app}\Protocol Viewer.exe"; WorkingDir: "{app}"
Name: "{userstartmenu}\Protocol Viewer"; Filename: "{app}\Protocol Viewer.exe"; WorkingDir: "{app}"
Name: "{userdesktop}\Protocol Viewer"; Filename: "{app}\Protocol Viewer.exe"; WorkingDir: "{app}"
Name: "{userstartmenu}\Uninstall"; Filename: "{uninstallexe}"; WorkingDir: "{app}"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"; WorkingDir: "{app}"
                                                         
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"

[Setup]
AppName=Protocol Viewer
AppVersion=1.01
SetupIconFile=E:\Projects\Work\LPZ\ProtocolPlayer_trunk\Release\Source\Resources\Logo52.ico
DefaultDirName={pf}\Protocol Viewer
AppPublisher=LPZ
AppPublisherURL=http://www.lpz.com.ua/
UninstallDisplayName=Protocol Viewer
UninstallDisplayIcon={app}\Protocol Viewer.exe
VersionInfoVersion=1.01
VersionInfoCompany=LPZ
VersionInfoProductName=Protocol Viewer
VersionInfoProductVersion=1.01
MergeDuplicateFiles=False
OutputDir=E:\Projects\Work\LPZ\ProtocolPlayer_trunk\Release\Output
OutputBaseFilename=ProtocolViewerSetup1.01
SourceDir=D:\ProtocolViewer
MinVersion=0,5.01sp3
AllowNoIcons=Yes
DefaultGroupName=Protocol Viewer

[Run]
Filename: {tmp}\dotNetFx40Client.exe; Parameters: "/q:a /c:""install /l /q"""; Check: CheckForFramework; StatusMsg: Microsoft Framework 4.0 Client Profile is beïng installed. Please wait...

[Code]  
//  check for framework
Function CheckForFramework : boolean;
Var
regresult : cardinal;
Begin
RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Client', 'Install', regresult);
If regresult = 0 Then
Begin
Result := true;
End
Else
Result := false;
End;